'''
Created on Aug 22, 2009

@author: echeek
'''
import math


def isLeft(a, b):
    pass;

def testTriangle(coords):
    wn=0.0;
    for i in range(3):
        ax=coords[(i-1)*2];
        ay=coords[(i-1)*2+1];
        bx=coords[i*2];
        by=coords[i*2+1];
        
        if(ay>=0 and by<=0):
            if(ax>=0 and bx>=0):
                wn-=1;
        
        if(ay<=0 and by>=0):
            if(ax>=0 and bx>=0):
                wn+=1;
        #amag=math.sqrt(ax**2 + ay**2);
        #bmag=math.sqrt(bx**2 + by**2);
        #wn+=math.acos(  (ax*bx+ay*by)/(amag*bmag));
    #wn*=(1.0/(2*math.pi));   
    print wn;  
    return wn!=0;


def Euler102():
    file=open('Euler102data.txt', 'r');
    
    count=0;
    for line in file:
        triang=[];
        for coord in line.strip().split(','):
            triang.append(int(coord));
        if testTriangle(triang):
            print True;
            count+=1;
        else:
            print False;
    print count;
                
            


Euler102();


